home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Communications / Network / MacHTTP 1.2.4 / AppleEvent Info / AppleEvents & MacHTTP Read Me next >
Text File  |  1994-01-10  |  2KB  |  24 lines

  1. Using MacHTTP with AppleEvents
  2. ==============================
  3.  
  4. Scripting MacHTTP
  5. -----------------
  6. MacHTTP can understand a limited set of AppleEvents. See the ReadMe.html file for specific details. In addition, the "More Scripts" folder contains some examples of how to script MacHTTP.
  7.  
  8. Sending AppleEvents from MacHTTP
  9. --------------------------------
  10. In addition to executing AppleScripts by compiling AppleScript source code on the fly, MacHTTP 1.2.2 can execute stand-alone applications or AppleScript applications that understand a specific AppleEvent, passing search arguments to them.
  11.  
  12. MacHTTP defines a custom AppleEvent that it sends to applications that are capable of performing search actions, etc. If you define a suffix mapping of type "APPL", MacHTTP will attempt to execute the application pointed to by the requested URL and will pass the application any search arguments received from the WWW client via this AppleEvent. The specifics are as follows:
  13.  
  14. The Event Suite is 'WWWΩ'
  15. The event code is 'srch'
  16. The direct parameter contains the search arguments as passed from the WWW client to MacHTTP.
  17. MacHTTP expects the AppleEvent reply's direct parameter to contain HTML text that will be transmitted to the client.
  18.  
  19. If you are a C or Pascal programmer, the above information will make sense. If you are creating compiled AppleScript applications, see the "search.exe" file in this folder for an example of how to handle receiving events from MacHTTP.  AppleScripts that contain a handler that starts with the line:
  20. on «event WWWΩsrch» search_args
  21. will be launched automatically, and the handler will be invoked with search_args appropriately defined.
  22.  
  23. IMPORTANT NOTE!!!! 
  24. "search.exe" must be loaded into the Script Editor and Saved As an Application with the Keep Open and Never Show Startup Screen boxes checked before using it with MacHTTP!!!